﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AMail.Common.Interfaces.Data;
using Elentok.Common.Collections;

namespace AMail.Modules.Data.Unittests.Mocks
{
  class MailFolderMock : IMailFolder
  {
    #region IMailFolder Members

    public MailFolderMock()
    {
      this.Messages = new VeryObservableCollection<IMailMessage>();
      this.Subfolders = new VeryObservableCollection<IMailFolder>();
    }

    public VeryObservableCollection<IMailMessage> Messages
    {
      get;
      set;
    }

    public VeryObservableCollection<IMailFolder> Subfolders
    {
      get;
      set;
    }

    public string Name
    {
      get
      {
        throw new NotImplementedException();
      }
      set
      {
        throw new NotImplementedException();
      }
    }

    public IMailFolder ParentFolder
    {
      get
      {
        throw new NotImplementedException();
      }
      set
      {
        throw new NotImplementedException();
      }
    }

    public IMailFolder PreviousParentFolder
    {
      get { throw new NotImplementedException(); }
    }

    public IMailArchive OwnerArchive
    {
      get { throw new NotImplementedException(); }
    }

    public void WriteXml(System.Xml.XmlTextWriter writer)
    {
      throw new NotImplementedException();
    }

    #endregion

    #region INotifyPropertyChanged Members

    public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged
    {
      add { throw new NotImplementedException(); }
      remove { }
    }

    #endregion

    #region IActionableObject Members

    public event EventHandler<MailActionEventArgs> ActionPerformed
    {
      add { throw new NotImplementedException(); }
      remove { }
    }

    #endregion

    #region IMailFolder Members


    public IMailFolder CreateSubfolder(string name)
    {
      var folder = new MailFolderMock { Name = name };
      folder.ParentFolder = this;

      return folder;
    }

    #endregion
  }
}
